<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>wxOptParse</title>
<meta content="wxOptParse, optparse, wxPython, python" name="keywords" />
<meta content="Graphical front end to optparse enabled python programs." lang="en" name="description" />
<style type="text/css">

/*
:Author: David Goodger
:Contact: goodger@users.sourceforge.net
:date: $Date: 2004/01/28 20:46:38 $
:version: $Revision: 1.36 $
:copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
SAK stuff added by Scott Kirkwood
Stolen from Asciidoc
*/

body {
    background: #dedede url("logo.gif") top left no-repeat fixed;
    margin: 0;
    min-height: 480px;
}

.first {
    margin-top: 0;
}

.last {
    margin-bottom: 0;
}

a.toc-backref {
    text-decoration: none ;
    color: black;
}

blockquote.epigraph {
    margin: 2em 5em;
}

dd {
    margin-bottom: 0.5em;
}

div.abstract {
    margin: 2em 5em;
}

div.abstract p.topic-title {
    font-weight: bold ;
}

div.attention, div.caution, div.danger, div.error, div.hint,
div.important, div.note, div.tip, div.warning, div.admonition {
    border: 3px solid #1f764c;    /* Olive green */
    padding: 0em 0.5em 1em 1em;
    margin: 0.5em 15% 0.5em 0;
}

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
    color: red ;
    font-weight: bold ;
    font-family: sans-serif;
}

div.hint p.admonition-title, div.important p.admonition-title,
div.note p.admonition-title, div.tip p.admonition-title,
div.admonition p.admonition-title {
    font-weight: bold ;
    font-family: sans-serif;
}

div.dedication {
    margin: 2em 5em ;
    text-align: center ;
    font-style: italic;
}

div.dedication p.topic-title {
    font-weight: bold ;
    font-style: normal;
}

div.figure {
    margin-left: 2em;
}

div.header {
    font-size: smaller;
}

div.sidebar {
    margin: 0.5em 15% 0.5em 0;
    padding: 0.5em 1em;
    border: 1px solid gray;
    background-color: #ffffee ;
}

div.sidebar p.rubric {
    font-family: sans-serif ;
    font-size: medium;
}

div.system-messages {
    margin: 5em;
}

div.system-messages h1 {
    color: red;
}

div.system-message {
    border: medium outset ;
    padding: 1em;
}

div.system-message p.system-message-title {
    color: red ;
    font-weight: bold;
}

div.topic {
    margin: 0em;
}

h1,h2,h3,h4,h5 {
    text-align: left;
    background: transparent;
    font-family: Tahoma, Verdana, sans-serif;
    font-weight: bold;
    margin-top: .8em;
}

/* SAK */
h1.title {
    padding: 0.5em 0 0.5em 1em;
    color: white;
    background: #1f764c;    /* Olive green */
    margin: 0 -0.5em 0 -1em;
    border-bottom: solid 1px black;
}

hr {
    width: 75%; 
}

ol.simple, ul.simple {
    margin-bottom: 1em;
}

ol.arabic {
    list-style: decimal;
}

ol.loweralpha {
    list-style: lower-alpha;
}

ol.upperalpha {
    list-style: upper-alpha;
}

ol.lowerroman {
    list-style: lower-roman;
}

ol.upperroman {
    list-style: upper-roman;
}

p.attribution {
    text-align: right ;
    margin-left: 50%;
}

p.caption {
    font-style: italic;
}

p.credits {
    font-style: italic ;
    font-size: smaller;
}

p.label {
    white-space: nowrap;
}

p.rubric {
    font-weight: bold ;
    font-size: larger ;
    color: maroon ;
    text-align: center;
}

p.sidebar-title {
    font-family: sans-serif ;
    font-weight: bold ;
    font-size: larger;
}

p.sidebar-subtitle {
    font-family: sans-serif ;
    font-weight: bold;
}

p.topic-title {
    font-weight: bold;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 200%;
}

/*
.admonition-title {
  display: none;
}
*/

pre.address {
    margin-bottom: 0 ;
    margin-top: 0 ;
    font-family: serif ;
    font-size: 100%;
}

pre.line-block {
    font-family: serif ;
    font-size: 100%;
}

pre.literal-block, pre.doctest-block {
    margin-right: 2em;
    background-color: #eeeeee;
}

span.classifier {
    font-family: sans-serif ;
    font-style: oblique;
}

span.classifier-delimiter {
    font-family: sans-serif ;
    font-weight: bold;
}

span.interpreted {
    font-family: sans-serif;
}

span.option {
    white-space: nowrap;
}

span.option-argument {
    font-style: italic;
}

span.pre {
    white-space: pre;
}

span.problematic {
    color: red;
}

table {
    margin-top: 0.5em ;
    margin-bottom: 0.5em;
}

table.citation {
    border-left: solid thin gray ;
    padding-left: 0.5ex;
}

table.docinfo {
    margin-bottom: 0;
    margin: 0px 48px 0 140px;
}

table.footnote {
/*  border-left: solid thin black ; */
    padding-left: 0.5ex;
}

td, th {
    padding-left: 0.5em ;
    padding-right: 0.5em ;
    vertical-align: top;
}

th.docinfo-name, th.field-name {
    font-weight: bold ;
    text-align: left ;
    white-space: nowrap;
}

h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
    font-size: 100%;
}

tt {
    background-color: #eeeeee;
}

ul.auto-toc {
    list-style-type: none;
}

/* Don't want the HR */
hr.footer {
    display: none;
}

/* SAK */
div.document {
    background: white;
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 2px solid black;
    border-bottom: 2px solid black;
    padding: 0 1em 0 2em;
    margin: 20px 3em 3em 140px;
}

/* SAK */
div.footer {
    background: #f0f0f0;    /* light gray */
    font: 8pt sans-serif;
    position: relative;
    top: -50px;
    margin: 0px 48px 0 140px;
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 2px solid black;
    border-bottom: 2px solid black;
    padding: 1em 0 1em 2em;
}

/* XML pretty */
div.xml {
    font-family: sans-serif;
    font-size: 9pt;
}

span.attrib {
    color: #008080;
}

span.keyword {
    color: #000080;
}

span.tags {
    color: #000080;
}

span.warning {
    color: maroon;
}

/* Before After Table */
table.beforeafter {
    border-collapse: collapse;
}

th.after, td.after {
    border-left: solid thin gray;
}

/* DDLs table */
table.ddls {
    border: solid thin gray ;
}

table.ddls th {
    background: #006633;
    color: white;
}

table.ddls td {
    font-size: 9pt;
    font-family: monospace;
}

div.ddltitle {
    border-top: solid thick black;
    background: #006633;
    color: white;
    font-size: x-large;
    padding: .2em 0em .2em .5em;
    margin: 1em 0em .5em 0em;
}
</style>
</head>
<body>
<div class="document" id="wxoptparse">
<h1 class="title">wxOptParse</h1>
<p>''Don't limit yourself to the command line.''</p>
<div class="contents topic">
<p class="topic-title first"><a id="table-of-contents" name="table-of-contents">Table of Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#introduction" id="id1" name="id1">Introduction</a></li>
<li><a class="reference" href="#features" id="id2" name="id2">Features</a></li>
<li><a class="reference" href="#dependencies" id="id3" name="id3">Dependencies</a></li>
<li><a class="reference" href="#download" id="id4" name="id4">Download</a></li>
<li><a class="reference" href="#installing" id="id5" name="id5">Installing</a><ul>
<li><a class="reference" href="#egg-download" id="id6" name="id6">Egg Download</a></li>
<li><a class="reference" href="#egg-file" id="id7" name="id7">Egg File</a></li>
<li><a class="reference" href="#easy-install-zip" id="id8" name="id8">Easy Install Zip</a></li>
<li><a class="reference" href="#normal-python-install" id="id9" name="id9">Normal Python Install</a></li>
</ul>
</li>
<li><a class="reference" href="#running" id="id10" name="id10">Running</a></li>
<li><a class="reference" href="#to-do" id="id11" name="id11">To Do</a></li>
<li><a class="reference" href="#related-links" id="id12" name="id12">Related Links</a></li>
<li><a class="reference" href="#changelog" id="id13" name="id13">Changelog</a></li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id1" id="introduction" name="introduction">Introduction</a></h1>
<p><tt class="docutils literal"><span class="pre">wxOptParse</span></tt> is a Python program that brings up a graphical representation of
the options that another python program has for the command line, via the <a class="reference" href="http://www.python.org/doc/2.4/lib/module-optparse.html">optparse</a>
module.</p>
<p>What this means is that if if you have a program that uses <a class="reference" href="http://www.python.org/doc/2.4/lib/module-optparse.html">optparse</a> you can
click on checkboxes, edit boxes, combo boxes, etc. instead of using the command line.</p>
<p>So instead of this:</p>
<pre class="literal-block">
usage: mytest.py [options]

options:
  -h, --help            show this help message and exit
  -f FILENAME, --file=FILENAME
                        Enter a filename
  -p PATH, --path=PATH  Enter a path
  -2 FILENAME2, --noHelp=FILENAME2
  -n NUMBER, --count=NUMBER
                        Enter a number
  -m FLOAT, --float=FLOAT
                        Enter a floating point number
  -b, --bool            Switch to true
  --nbool               Switch to false
  --choice=CHOICE       Choice
</pre>
<p>You get</p>
<img alt="mytest-sample.png" src="mytest-sample.png" />
</div>
<div class="section">
<h1><a class="toc-backref" href="#id2" id="features" name="features">Features</a></h1>
<ul class="simple">
<li>Cross-platform.  Should work on Windows, Linux, Unix, or Mac.</li>
<li>Absolutely no changes required for the program you want to run.</li>
<li>You can continue to use the program at the command line as well.</li>
<li>Boolean flags shown as checkboxes.</li>
<li>String options that use the word &quot;file&quot; add a file browser button.</li>
<li>String options that use the work &quot;path&quot; or &quot;folder&quot; add a path browser button.</li>
<li>Choices are shown as a combo box.</li>
<li>Your most recently used choices are used by default.</li>
<li>A history of your previous items are stored.</li>
<li>There's a sample of how you can run any program through wxOptParse, not just a python program. See wxFind.</li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id3" id="dependencies" name="dependencies">Dependencies</a></h1>
<ul class="simple">
<li>wxPython 2.5.3 or greater. (<a class="reference" href="http://www.wxpython.org">http://www.wxpython.org</a>)</li>
<li>elementtree 1.2 or greater (<a class="reference" href="http://effbot.org/zone/element-index.htm">http://effbot.org/zone/element-index.htm</a>)</li>
<li>Python 2.4 (untested in 2.3). (<a class="reference" href="http://www.python.org">http://www.python.org</a>)</li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id4" id="download" name="download">Download</a></h1>
<p><a class="reference" href="http://developer.berlios.de/project/showfiles.php?group_id=4589">http://developer.berlios.de/project/showfiles.php?group_id=4589</a></p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id5" id="installing" name="installing">Installing</a></h1>
<p>Choose one of the following methods.  In all cases you probably need to run as root.</p>
<div class="section">
<h2><a class="toc-backref" href="#id6" id="egg-download" name="egg-download">Egg Download</a></h2>
<pre class="literal-block">
easy_install.py wxoptparse
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id7" id="egg-file" name="egg-file">Egg File</a></h2>
<pre class="literal-block">
easy_install.py wxOptParse-0.1.2-py2.4.egg
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id8" id="easy-install-zip" name="easy-install-zip">Easy Install Zip</a></h2>
<pre class="literal-block">
easy_install.py wxOptParse-0.1.2.zip
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id9" id="normal-python-install" name="normal-python-install">Normal Python Install</a></h2>
<pre class="literal-block">
unzip wxOptParse-0.1.2.zip
cd wxOptParse-0.1.2
python setup.py install
</pre>
</div>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id10" id="running" name="running">Running</a></h1>
<p>If you want to run your program you should be able to type:</p>
<p>$ wxoptparse myprogram.py</p>
<p>Assuming your program is called <tt class="docutils literal"><span class="pre">myprogram.py</span></tt></p>
<p>There's a sample program installed called wxFind which runs the GNU find command, if available. The source code shows you how it is done. Unfortunately, GNU's find doesn't use the standard style of parameters so some handling of the parameters needs to be done, but it is still quite useful.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id11" id="to-do" name="to-do">To Do</a></h1>
<ul class="simple">
<li>A way to <em>use</em> your recent items (combo box) - currently it shows the lastvalue used.</li>
<li>Allow you to change <cite>your</cite> program so that it uses, optionally, <tt class="docutils literal"><span class="pre">wxOptParse</span></tt>.</li>
<li>A method to force an option's items type (like whether it is to browse for file/folder)</li>
<li>Ability to reset the options to the defaults.</li>
<li>Ability to save a set of settings and give it a name.</li>
<li>Use radio buttons when appropriate.</li>
<li>Use tooltips</li>
<li>Run the ouput in a sub-window (I tried but wasn't able to do it).</li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id12" id="related-links" name="related-links">Related Links</a></h1>
<ul>
<li><p class="first">This project's homepage <a class="reference" href="http://developer.berlios.de/projects/wxoptparse/">http://developer.berlios.de/projects/wxoptparse/</a></p>
</li>
<li><p class="first">The Wiki is at <a class="reference" href="http://openfacts.berlios.de/index-en.phtml?title=wxOptParse">http://openfacts.berlios.de/index-en.phtml?title=wxOptParse</a></p>
</li>
<li><p class="first">You can access via Subversion with:</p>
<pre class="literal-block">
svn checkout svn://svn.berlios.de/wxoptparse/trunk
</pre>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">configparse</span></tt>: an optparse extension module for configuration file parsing. <a class="reference" href="http://www.gustaebel.de/lars/configparse/">http://www.gustaebel.de/lars/configparse/</a></p>
</li>
<li><p class="first">My web blog: <a class="reference" href="http://scottkirkwood.blogspot.com/">http://scottkirkwood.blogspot.com/</a></p>
</li>
<li><p class="first">My homepage (gathering cobwebs) <a class="reference" href="http://forusers.com/">http://forusers.com/</a></p>
</li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id13" id="changelog" name="changelog">Changelog</a></h1>
<ul class="simple">
<li>Release 0.1.6 - 2006-11-13<ul>
<li>Now correctly remembers last value</li>
<li>Passing commands on the command line works</li>
<li>Problems with wxpython versioning, removed.</li>
<li>The extra arguments were't saved, now they are.</li>
<li>The previous args are now saved with a dot to hide it in Linux</li>
<li>Tests were added to the package</li>
<li>Works if the .py file is in another directory</li>
<li>Tabbing in the dialog works now</li>
<li>The Go button is the default, Enter now works.</li>
</ul>
</li>
<li>Release 0.1.4 - 2005-10-06<ul>
<li>Added sample running the find command. Added some fixes to the setup.</li>
</ul>
</li>
<li>Release 0.0.1 - Sept 11th, 2005<ul>
<li>Initial working release.</li>
</ul>
</li>
</ul>
</div>
</div>
</body>
</html>
